<template>

</template>

<script>
    export default {
        name: "gaodeBuilding",
        computed: {
            //视图初始化状态监听
            viewerReadyEvent() {
                return this.$store.getters.gaodeMapStatus
            },
        },
        watch: {
            viewerReadyEvent(val) {
                if (window.gaodeMap || val) {
                    this.init()
                }
            }
        },
        methods: {
            init() {
                // 楼块图层
                var buildingsLayer = new AMap.Buildings({
                    zooms: [16, 18],
                    zIndex: 10,
                    heightFactor: 2 //2倍于默认高度，3D下有效
                })
                gaodeMap.add([buildingsLayer])
            }
        }
    }
</script>

<style scoped>

</style>
